/*
* 本类用于创建一个16*16的矩阵
* */
package Question1;

import java.util.Arrays;
import java.util.Random;

public class Matrix {

    //定义矩阵大小
    private static final int NUM = 16;

    public int getNUM() {
        return NUM;
    }

    //绘制矩阵
    public int[][] drawMatrix() {
        int[][] Ma = new int[NUM][NUM];
        //随机值不方便验证计算结果是否正确；
        //Random ra = new Random();
        for (int i = 0; i < NUM; i++) {
            for(int j = 0;j < NUM;j++){
                Ma[i][j] = 1;
            }
        }
        //打印生成的矩阵
        for (int k = 0; k < NUM; k++) {
            for (int l = 0; l < NUM; l++) {
                System.out.print(Ma[k][l] + " ");
            }
            System.out.println();
        }
        return Ma;
    }
}
